<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title></title>
		<script src="js/aes_1.js"></script>
		<script src="js/md5.js"></script>
		<script>
		
		        var key = CryptoJS.enc.Utf8.parse("1234567812345678");  
		        var iv  = CryptoJS.enc.Utf8.parse('1234567812345678');  
		        function Encrypt(word){
		            srcs = CryptoJS.enc.Utf8.parse(word);
		            var encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv,mode:CryptoJS.mode.CBC,padding: CryptoJS.pad.Pkcs7});
		            return encrypted.ciphertext.toString().toUpperCase();
		        }
		
		        function Decrypt(word){  
		            var encryptedHexStr = CryptoJS.enc.Hex.parse(word);
		            var srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
		            var decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv,mode:CryptoJS.mode.CBC,padding: CryptoJS.pad.Pkcs7});
		            var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); 
		            return decryptedStr.toString();
		        }
		
		        var mm = Encrypt('你好')
		        console.log(mm);
		        var jm = Decrypt(mm);
		        console.log(jm)
				
				console.info(hex_md5("nihao"))
		    </script>
	</head>
	<body>
		
	</body>
</html>
